-
Notifications
You must be signed in to change notification settings - Fork 38.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix job backoff limit for restart policy Never #93779
Fix job backoff limit for restart policy Never #93779
Conversation
…ailures instead of number of NumRequeues
Welcome @yodarshafrir1! |
Hi @yodarshafrir1. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign @erictune |
Wow! Thanks so much for the PR! Can't wait to use this on my cluster |
/assign @soltysh |
/unassign @erictune |
/ok-to-test |
Remove patch in e2e test of backoff limit due to usage of NumRequeues
/retest |
2 similar comments
/retest |
/retest |
tests are passing, can someone PTAL? |
pinging @soltysh, @smarterclayton, @krmayankk for reviews/comments please |
@soltysh @smarterclayton @krmayankk could you please review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: soltysh, yodarshafrir1 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test pull-kubernetes-integration |
/test pull-kubernetes-conformance-kind-ga-only-parallel |
What type of PR is this?
/kind bug
What this PR does / why we need it:
The Job controller currently uses
NumRequeues
to decide wether or not the job has exceeded the backoffLimit.NumRequeues
represents the number of times a job has been requeued, a requeue can occur due to several reasons and not only for Fail events. This makes backoffLimit unpredictable.This PR sets the job controller to use the number of
Failed
pods to decide if the job has exceeded the backoffLimit.According to the documentation: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/apps/job.md#backoff-policy-and-failed-pod-limit
For restart policy of
OnFailure
- the logic is handled inpastBackoffLimitOnFailure
as described above.For restart policy of
Never
- this PR fixes the logic to be as described above.This solution has been discussed in the past by @janetkuo in: #70251 (comment)
Which issue(s) this PR fixes:
Fixes #93559, #92245, #70251, #64787
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: